﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace NCommet.TestGUI
{
    public enum AllowDenyValue
    {
        Allow, Deny
    }

    public partial class AllowDenyControl : UserControl
    {
        public AllowDenyControl()
        {
            InitializeComponent();
        }

        private void AllowDenyControl_Load(object sender, EventArgs e)
        {

        }

        [DefaultValue(AllowDenyValue.Deny)]
        public AllowDenyValue Value
        {
            get
            {
                if (rbAllow.Checked)
                    return AllowDenyValue.Allow;
                return AllowDenyValue.Deny;
            }
            set
            {
                switch (value)
                {
                    case AllowDenyValue.Allow:
                        rbAllow.Checked = true;
                        break;
                    default:
                        rbDeny.Checked = true;
                        break;
                }
            }
        }




    }
}
